Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust PaymentPlan model to contain informations coming from TP and HS #4372

Merged
merged 178 commits into from
Jan 13, 2025

Conversation

pavlo-mk
Copy link
Contributor

@pavlo-mk pavlo-mk commented Oct 25, 2024

Use one model for TP and PP PaymentPlan

AB#215785: Adjust PaymentPlan model to contain informations coming from TP and HS
AB#215790: Adjust Payment Module to filter out the Payment Plan which are draft (old Target Population)

one time script migrate_tp_into_pp

TP rule now using Payment Plan:
result = rule.execute( { "household": payment.household, "payment_plan": payment_plan, } )

@pavlo-mk pavlo-mk added long-term-branch backend Changes in BE code labels Oct 25, 2024
@pavlo-mk pavlo-mk self-assigned this Oct 25, 2024
src/hct_mis_api/apps/payment/celery_tasks.py Outdated Show resolved Hide resolved
src/hct_mis_api/apps/payment/celery_tasks.py Show resolved Hide resolved
src/hct_mis_api/apps/payment/models.py Outdated Show resolved Hide resolved
src/hct_mis_api/apps/payment/models.py Outdated Show resolved Hide resolved
src/hct_mis_api/apps/payment/models.py Outdated Show resolved Hide resolved
Base automatically changed from long-term/remove-tp to develop November 20, 2024 13:16
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 97.80105% with 21 lines in your changes missing coverage. Please review.

Project coverage is 85.02%. Comparing base (9c6454c) to head (8c3860a).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/hct_mis_api/apps/payment/models/payment.py 96.82% 11 Missing ⚠️
...api/apps/payment/services/payment_plan_services.py 98.36% 3 Missing ⚠️
src/hct_mis_api/apps/accountability/schema.py 80.00% 1 Missing ⚠️
...ps/accountability/services/survey_crud_services.py 85.71% 1 Missing ⚠️
src/hct_mis_api/apps/payment/mutations.py 98.86% 1 Missing ⚠️
src/hct_mis_api/apps/payment/schema.py 98.33% 1 Missing ⚠️
src/hct_mis_api/apps/program/admin.py 0.00% 1 Missing ⚠️
src/hct_mis_api/apps/targeting/filters.py 0.00% 1 Missing ⚠️
src/hct_mis_api/apps/utils/admin.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4372      +/-   ##
===========================================
- Coverage    85.03%   85.02%   -0.02%     
===========================================
  Files          515      516       +1     
  Lines        36333    36326       -7     
===========================================
- Hits         30897    30887      -10     
- Misses        5436     5439       +3     
Flag Coverage Δ
e2e 60.54% <69.52%> (-1.96%) ⬇️
unittests 83.30% <97.06%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pavlo-mk pavlo-mk requested a review from MarekBiczysko January 9, 2025 13:40
@pavlo-mk pavlo-mk added frontend Changes in FE code and removed work in progress Change doesn't need to be reviewed labels Jan 9, 2025
@pavlo-mk pavlo-mk merged commit 952f776 into develop Jan 13, 2025
13 checks passed
@pavlo-mk pavlo-mk deleted the adjust-pp-model branch January 13, 2025 18:25
pavlo-mk added a commit that referenced this pull request Jan 15, 2025
* uv

* fixes / mypy dont pass

* fix compose paths

* fix e2e

* 228219_fincacial_service_provider_admin_fix

* fix flaky test failing due to beginning of new year

* fix another flaky test

* fix also last_Registration_date

* 217655_dedup_statistics_rdi_population_preview (#4545)

* Adjust PaymentPlan model to contain informations coming from TP and HS (#4372)

* init

* add tp list rest

* init changes

* add TP_MIGRATION_MAPPING

* modify create target population add collector group

* style 🎯

* add collector filters blocks

* upd few more fields and properties

* move full_rebuild & refactoring

* add collector rule groups

* add CheckConstraint & migrations

* update validation & migrations

* upd tests

* upd migrations

* fe cleanup & add more ut 🌟

* coverage 💯

* init script

* upd

* script optimization

* refactor: create/upd mutation

* add updated_tc_rules

* refactor mutations

* refactor mutations

* upd migrations

* more fixes

* migrations // fix initdemo

* migration

* add more statuses transitions

* fixes

* fixes // upd unit tests

* more refactoring and upd unit tests

* unit tests // fixes

* conflicts & remove unused TPnode

* migrations conflict

* migration

* add TODOs & skip

* add more tests // fixes

* remove unused code

* fixes // add more tests

* upd snapshot

* more tests

* more tests

* add more 💯 🌟

* upd migration script

* change mutations part 1

* add more test & refactoring migration script

* add test_migrate_tp_into_pp

* more adjustments

* upd tests & fix .delete()

* remove imports

* upd test

* delete, copy

* accountability

* add filters isTargetPopulation & isPaymentPlan

* more changes

* generate schema

* add migrate_message_and_survey

* fix update targeting_criteria

* upd filter

* migration script upd

* more changes

* more

* add more unit tests ⭐

* fix migration script & upd unit tests 🌟

* next part

* more

* more changes

* upd filters

* add total_households_count_with_valid_phone_no

* upd filter

* fix

* another part

* add noStatus filter

* statusNot

* add GraphQLError when no ba header for allPrograms query

* frontend compiles

* fixes

* fix payments lists TP

* fix pp list

* lint

* fix snapshots

* minor fixes

* fix buttons and status

* fix pp queries

* fix generated

* fix schema

* fix e2e fixtures

* upd statuses

* fixes 🌟

* unit tests ⭐

* unit tests & coverage 🌟

* fix e2e

* fix e2e

* fix labels + lock unlock

* id undefined

* fix mutation

* bring back verify manual

* bug fixes

* targeting hh fix

* upd fe test

* fix fe fixtures

* fix more e2e

* again fix more e2e

* fix e2e

* schema

* upd filtering

* test with e2e

* test with test_edit_targeting

* add xfail

* small fixes

* update snapshots

* fixes

* upd test

* add open pp mutation

* fix upd currency ⭐

* review

* migration

* ba fixtures

* fe schema upd

* remove isPaymentPlanApplicable and Draft status

* clean up

* upd filters

* fix status

* change steficon mutation

* steficon pp

* upd mutations

* upd schema

* fixes for SetSteficonRuleOnPaymentPlanPaymentListMutation

* fe lint

* remove none option in vulnerability component

* fix ut

* fe fixes

* more fixes

* upd query 🌟

* review

* one more fix

* revert filtering back

---------

Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: marekbiczysko <[email protected]>

* fixing path

* cert download develop

* exclude hope on dev install

* fix docker file one more time python path for dev image

* New API endpoints aurora (#4548)

* WIP: add OrganizationListView

* WIP: upd api & add simple unit tests

* ut

* add cache & upd unit tests

* remove pdm.lock

* fixes for selenium test localy

* DEV update migration script TP>PP (#4553)

* upd migrations script

* fix 🌟

* upd comment

---------

Co-authored-by: Jan Romaniak <[email protected]>
Co-authored-by: marekbiczysko <[email protected]>
Co-authored-by: Domenico <[email protected]>
Co-authored-by: Paulina Kujawa <[email protected]>
Co-authored-by: Paulina Kujawa <[email protected]>
Co-authored-by: Marek Biczysko <[email protected]>
Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: Jan Romaniak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Changes in BE code frontend Changes in FE code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants